import { BaseNode } from '@/components/complex/BaseNode';
import { defineComponentAndRegisterToGraph } from '@/components/complex/BaseNode/define';
import { NodeDrawer } from '@/components/complex/NodeDrawer';
import { NODE_TYPE } from '@/constants/config';

import { BlockSetting } from '../../BaseNode/components/BlockSetting';
import { NodeVariableMangerForm } from '../../NodeVariableMangerForm';
import { DataLoadConfig } from './config';

export const DataLoadNode = defineComponentAndRegisterToGraph(NODE_TYPE.DATA_LOAD, (props) => {
  return (
    <NodeDrawer trigger={<BaseNode {...props} nodeType={NODE_TYPE.DATA_LOAD} />}>
      <BlockSetting className="mb-12" />
      <NodeVariableMangerForm />
      <DataLoadConfig />
    </NodeDrawer>
  );
});
